<?php

class View {
    
    private $_data;
    private $_controller;
    
    function __construct($controller)
    {
	$this->_controller = $controller;
    }
    
    public function set($name,$value)
    {
	$this->_data[$name] = $value;
    }
    
    public function render($view)
    {
	if (is_array($this->_data))
	    extract ($this->_data);
        // Load the view
        require('application/views/'.$this->_controller.'/'.$view.'.php');
            
    }
}